<template>
	<el-container>
		<el-header>找回密码</el-header>
		<el-main>
			<el-row :gutter="20">
				<el-col :span="24">
					<div class="grid-content1 bg-purple"></div>
				</el-col>
			</el-row>
			<el-row :gutter="20">
				<el-col :span="10">
					<div class="grid-content bg-purple" align="right">手机号：</div>
				</el-col>
				<el-col :span="8">
					<div class="grid-content bg-purple" align="center">
						<el-input v-model="input" placeholder="请输入内容"></el-input>
					</div>
				</el-col>
			</el-row>
			<el-row :gutter="20">
				<el-col :span="10">
					<div class="grid-content bg-purple" align="right">验证码：</div>
				</el-col>
				<el-col :span="6">
					<div class="grid-content bg-purple" align="center">
						<el-input  placeholder="请输入验证码" v-model="input1" ></el-input>
					</div>
				</el-col>
				<el-col :span="4">
					<div class="grid-content bg-purple" align="left">
						<el-button :plain="true" @click="open1"type="primary">获取验证码</el-button>
					</div>
				</el-col>
			</el-row>
			<el-row :gutter="20">
				<el-col :span="24">
					<div class="grid-content bg-purple">
						<el-button :plain="true" @click="resetpassword()">确定</el-button>
					</div>
				</el-col>
			</el-row>
		</el-main>
		<el-footer>
			<el-row :gutter=" 20">
				<el-col :span="4">
					<div class="grid-content bg-purple1">
						<el-button>返回主界面</el-button>
					</div>
				</el-col>
				<el-col :span="16">
					<div class="grid-content bg-purple1" align="center"></div>
				</el-col>
				<el-col :span="4">
					<div class="grid-content bg-purple1">
					</div>
				</el-col>
			</el-row>
		</el-footer>
	</el-container>
</template>

<script>
	import {
		showMsgTitle
	} from '@/utils/api'
	import {
		showMsgConfirm
	} from '@/utils/api'
	import {
		getRequest
	} from '@/utils/api'
	
	export default {
		data() {
			return {
				test:{
				password: '',
				ensure: ''},
				input:"",
				input1:""
			}
		},
		mounted: function() {
			let url = "/doctor/test";
			let _this = this;
			getRequest(url).then(resp => {
				if (resp.status == 200) {
					//alert(resp.data);
					_this.test = resp.data;
				} else {
					_this.$message({
						type: 'error',
						message: '数据加载失败!'
					});
				}
			}, resp => {
				_this.loading = false;
				if (resp.response.status == 403) {
					_this.$message({
						type: 'error',
						message: resp.response.data
					});
				} else {
					_this.$message({
						type: 'error',
						message: '数据加载失败!'
					});
				}
			}).catch(resp => {
				//压根没见到服务器
				_this.loading = false;
				_this.$message({
					type: 'error',
					message: '数据加载失败!'
				});
			});
			// this.axios.get('/api/user/allUser')
			// 	.then(res => {
			// 		this.tableData = res.data;
			// 	})
			// 	.catch(function(error) {
			// 		console.log(error);
			// 	});
		},
		methods: {
			open1() {
				this.$message({
					showClose: true,
					message: '验证码已发送至您的手机',
					type: 'success'
				});
			},
			resetpassword() {
				this.$router.push({
					path: '/reset_password',
					query:{tel:this.input},
				})
			}
		}
	}
</script>
<style>
	.el-footer {
		background-color: #4FC1B0;
		color: #333;
		text-align: center;
		line-height: 60px;
		border-radius: 10px;
	}

	.el-header {
		text-align: left;
		font-size: 40px;
		color: #ffffff;
		border-radius: 10px;
		background-color: #4FC1B0;
	}

	.el-main {
		background-color: #ffffff;
		color: #333;
		text-align: center;
		height: 610px;
	}

	.el-row {
		margin-bottom: 20px;

		&:last-child {
			margin-bottom: 0;
		}
	}

	.el-col {
		border-radius: 4px;
	}


	.bg-purple {
		background: #ffffff;
	}

	.bg-purple1 {
		background: #4FC1B0;
	}

	.grid-content {
		border-radius: 4px;
		min-height: 50px;
		font-size: 24px;
	}

	.grid-content1 {
		border-radius: 4px;
		min-height: 160px;

	}
</style>
